package designpattern.singleton.type8;

/*
    单例模式的枚举
 */
public enum Singleton {
    SINGLETON;
}
class Test{
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Thread(()->{
                System.out.println(Singleton.SINGLETON.hashCode());
            }).start();
        }
    }
}
